﻿// COPYRIGHT (C) Markeluo ALL RIGHTS RESERVED. 
// GITEE: https://gitee.com/luowanli/AntdUI 
// QQ: 563944808

namespace IMES.VO
{
    public class SysRoleVO : AntdUI.NotifyProperty
    {
        public SysRoleVO() 
        {
            _btns = new AntdUI.CellLink[] {
                new AntdUI.CellButton("edit", "编辑"){Fore=Color.FromArgb(255,143,11),Radius=0,DefaultBack=Color.Transparent,Back=Color.Transparent},
                new AntdUI.CellButton("delete", "删除"){ Fore=Color.FromArgb(176,8,8),Radius=0,DefaultBack=Color.Transparent,Back=Color.Transparent}
            };
        }

        private long _id;
        private bool _isAdmin;
        private bool _isDeleted;
        private string _name;
        private string _remark;
        private bool? _usable;
        private bool _check = false;

        public long Id
        {
            get { return _id; }
            set { _id = value; }
        }

        public bool check
        {
            get => _check;
            set
            {
                if (_check == value) return;
                _check = value;
                OnPropertyChanged();
            }
        }

        public bool IsDeleted
        {
            get { return _isDeleted; }
            set { _isDeleted = value; }
        }
        public string Name
        {
            get { return _name; }
            set 
            { 
                if (_name == value) return;
                _name = value;
                OnPropertyChanged();
            }
        }
        public bool IsAdmin
        {
            get { return _isAdmin; }
            set
            {
                if (_isAdmin == value) return;
                _isAdmin = value;
                OnPropertyChanged();
            }
        }
        public bool? Usable
        {
            get { return _usable; }
            set 
            {
                if (_usable == value) return;
                _usable = value;
                OnPropertyChanged(); 
            }
        }
        public string Remark
        {
            get { return _remark; }
            set 
            {
                if (_remark == value) return;
                _remark = value;
                OnPropertyChanged();
            }
        }

        AntdUI.CellLink[] _btns;
        public AntdUI.CellLink[] btns
        {
            get => _btns;
            set
            {
                _btns = value;
                OnPropertyChanged();
            }
        }
    }
}
